import request from '@/utils/request'

// 查询休假记录列表
export function listVacation(query) {
  return request({
    url: '/module/cjl/vacation/list',
    method: 'get',
    params: query
  })
}

// 查询休假记录详细
export function getVacation(id) {
  return request({
    url: '/module/cjl/vacation/' + id,
    method: 'get'
  })
}

// 新增休假记录
export function addVacation(data) {
  return request({
    url: '/module/cjl/vacation',
    method: 'post',
    data: data
  })
}

// 修改休假记录
export function updateVacation(data) {
  return request({
    url: '/module/cjl/vacation',
    method: 'put',
    data: data
  })
}
// 部门审核休假记录
export function viewVacation(data) {
  return request({
    url: '/module/cjl/vacation/view',
    method:"put",
    data: data
  })
}
// 局长审核休假记录
export function chiefYhVacation(data) {
  return request({
    url: '/module/cjl/vacation/chief',
    method:"put",
    data: data
  })
}
// 政委审核休假记录
export function gaottYhVacation(data) {
  return request({
    url: '/module/cjl/vacation/gaott',
    method:"put",
    data: data
  })
}
// 销假记录
export function backYhVacation(data) {
  return request({
    url: '/module/cjl/vacation/back',
    method:"put",
    data: data
  })
}
// 删除休假记录
export function delVacation(id) {
  return request({
    url: '/module/cjl/vacation/' + id,
    method: 'delete'
  })
}
